//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.neurosky.thinkgear;

import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;

public class EkgParameters {
    public int artifactStdThreshold = 2400;
    public int epochLen = 296;
    public int prePeakAmplitude = 2700;
    public int prePeakLatency = -15;
    public int postPeakLatency = 11;
    public int postPeakAmplitude = -1;
    public int epochValidMeanThreshold = 1700;
    public int epochValidMaxThreshold = 500;
    public int epochValidMaxModifier1 = 1000;
    public int epochValidMaxModifier2 = 10;
    public int templateNum = 5;
    public int templatesForDist = 5;
    public int templateMaxDistance = 435;
    public int templateDistThreshold = 50;
    public int templateDistStdDiff = 100;
    public int templateDistModifier1 = -1;
    public int templateDistModifier2 = -1;
    public int lineNoiseThreshold = 1000000;
    public int smoothing = 8;
    public int stanley = 0;
    public int verboseMatlab = 0;

    public EkgParameters() {
    }

    public EkgParameters(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11, int var12, int var13, int var14, int var15, int var16) {
        this.artifactStdThreshold = var1;
        this.epochLen = var2;
        this.prePeakAmplitude = var4;
        this.prePeakLatency = var5;
        this.postPeakLatency = var7;
        this.postPeakAmplitude = var6;
        this.epochValidMeanThreshold = var8;
        this.epochValidMaxThreshold = var9;
        this.epochValidMaxModifier1 = var10;
        this.epochValidMaxModifier2 = var11;
        this.templateNum = var12;
        this.templateDistThreshold = var13;
        this.templateDistStdDiff = var14;
        this.templateDistModifier1 = var15;
        this.templateDistModifier2 = var16;
    }

    public EkgParameters(String var1) {
        try {
            JSONObject var3;
            if((var3 = (JSONObject)(new JSONTokener(var1)).nextValue()).has("artifactStdThreshold")) {
                this.artifactStdThreshold = var3.getInt("artifactStdThreshold");
            }

            if(var3.has("epochLen")) {
                this.epochLen = var3.getInt("epochLen");
            }

            if(var3.has("prePeakAmplitude")) {
                this.prePeakAmplitude = var3.getInt("prePeakAmplitude");
            }

            if(var3.has("prePeakLatency")) {
                this.prePeakLatency = var3.getInt("prePeakLatency");
            }

            if(var3.has("PostPeakLatency")) {
                this.postPeakLatency = var3.getInt("PostPeakLatency");
            }

            if(var3.has("PostPeakAmplitude")) {
                this.postPeakAmplitude = var3.getInt("PostPeakAmplitude");
            }

            if(var3.has("epochValidMeanThreshold")) {
                this.epochValidMeanThreshold = var3.getInt("epochValidMeanThreshold");
            }

            if(var3.has("epochValidMaxThreshold")) {
                this.epochValidMaxThreshold = var3.getInt("epochValidMaxThreshold");
            }

            if(var3.has("epochValidMaxModifier1")) {
                this.epochValidMaxModifier1 = var3.getInt("epochValidMaxModifier1");
            }

            if(var3.has("epochValidMaxModifier2")) {
                this.epochValidMaxModifier2 = var3.getInt("epochValidMaxModifier2");
            }

            if(var3.has("templateNum")) {
                this.templateNum = var3.getInt("templateNum");
            }

            if(var3.has("templatesForDist")) {
                this.templatesForDist = var3.getInt("templatesForDist");
            }

            if(var3.has("templateDistThreshold")) {
                this.templateDistThreshold = var3.getInt("templateDistThreshold)");
            }

            if(var3.has("templateDistStdDiff")) {
                this.templateDistStdDiff = var3.getInt("templateDistStdDiff");
            }

            if(var3.has("templateDistModifier1")) {
                this.templateDistModifier1 = var3.getInt("templateDistModifier1");
            }

            if(var3.has("templateDistModifier2")) {
                this.templateDistModifier2 = var3.getInt("templateDistModifier2");
            }

            if(var3.has("lineNoiseThreshold")) {
                this.lineNoiseThreshold = var3.getInt("lineNoiseThreshold");
            }

            if(var3.has("smoothing")) {
                this.smoothing = var3.getInt("smoothing");
            }

            if(var3.has("stanley")) {
                this.stanley = var3.getInt("stanley");
            }

            if(var3.has("verboseMatlab")) {
                this.verboseMatlab = var3.getInt("verboseMatlab");
            }

        } catch (JSONException var2) {
            ;
        }
    }

    public void save() {
    }
}
